<?php require_once(dirname(__FILE__).'/inc/config.inc.php');IsModelPriv('usergroup_list'); ?>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,initial-scale=1.0,user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<title>会员组管理 </title>
<link href="templates/css/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" charset="utf-8" src="templates/js/jquery-1.11.2.min.js"></script>
<script type="text/javascript" charset="utf-8" src="templates/js/layindex.js"></script>
<script type="text/javascript" charset="utf-8" src="templates/js/common.js"></script>
<script type="text/javascript" src="templates/js/forms.func.js"></script>
<style>
.ltable .input{padding:0px 4px; min-height:28px; line-height:20px;}
</style>
</head>

<body class="mainbody">
<!--导航栏-->
<div class="location">
  <a href="javascript:history.back(-1);" class="back"><i></i><span>返回上一页</span></a>
  <a href="home.php" class="home"><i></i><span>首页</span></a>
  <i class="arrow"></i>
  <span>会员组管理</span>
  <a href="javascript:location.reload();" class="reload">刷新</a>
</div>
<!--/导航栏-->
<form name="form" id="form" method="post"  action="usergroup_save.php?action=save">
<!--工具栏-->
<div id="floatHead" class="toolbar-wrap">
  <div class="toolbar">
    <div class="box-wrap">
      <a class="menu-btn"></a>
      <div class="l-list">
        <ul class="icon-list">
        <ul class="icon-list">
		  <li><a class="add" href="#flagnameadd"><i></i><span>新增</span></a></li>
          <li><a id="btnSave" class="save" onclick="form.submit();"  href="javascript:;"><i></i><span>保存</span></a></li>
          <li><a class="all" href="javascript:;" onclick="checkAll(this);"><i></i><span>全选</span></a></li>
		  <li><a href="javascript:DelAllNone('usergroup_save.php');" onclick="return ConfDelAll(1);" class="del"><i></i><span>删除</span></a></li>
        </ul>
        </ul>
      </div>
      
    </div>
  </div>
</div>
<!--/工具栏-->
<form method="post" action="" id="form1">
<!--列表-->
<div class="table-container">
  
  <table width="100%" border="0" cellspacing="0" cellpadding="0" class="ltable">
    <tr >
     <th width="2%"></th>   
	 <th width="3%">ID</th>
			<th width="20%">用户组名称</th>
			<th width="20%">用户组经验值</th>
			<th width="15%">星星数</th>
			<th width="10%">头衔颜色</th>
	  <th width="12%">操作</th>
<?php
		$dosql->Execute("SELECT * FROM `#@__usergroup` ORDER BY id ASC");
		
		if($dosql->GetTotalRow() > 0)
		{
			while($row = $dosql->GetArray())
			{			
		?>
		<tr align="center">
			<td align="center" ><span class="checkall" style="vertical-align:middle;"><input type="checkbox" name="checkid[]" value="<?php echo $row['id']; ?>" /></span></td>
			<td align="center"><?php echo $row['id']; ?></td>
			<td><input type="text" name="groupname[]" id="groupname[]" class="input" value="<?php echo $row['groupname']; ?>" />
			<input type="hidden" name="id[]" id="id[]" value="<?php echo $row['id']; ?>" /></td>
			<td><input type="text" name="expvala[]" id="expvala[]" class="input small" value="<?php echo $row['expvala']; ?>" />
				~
				<input type="text" name="expvalb[]" id="expvalb[]" class="input small" value="<?php echo $row['expvalb']; ?>" /></td>
			<td><input type="text" name="stars[]" id="stars[]" class="input small" value="<?php echo $row['stars']; ?>" /></td>
			<td><input type="text" name="color[]" id="color[]" class="input" value="<?php echo $row['color']; ?>" /></td>
			<td class="action endCol"><a href="usergroup_save.php?action=del2&id=<?php echo $row['id'] ?>" onclick="return ConfDel(0);">删除</a></td>
		</tr>
		<?php
			}
		}
		else
		{
		?>
		<tr align="center">
			<td colspan="7" class="dataEmpty">暂时没有相关的记录</td>
		</tr>
		<?Php
		}
		?>
			<tr align="left">
			<td></td>
			<td colspan="4"><strong>新增一个用户组</strong></td>
		</tr>
	<tr align="center" >
			<td height="36">&nbsp;</td>
			<td>&nbsp;</td>
			<td><input type="text" name="groupname_add" id="groupname_add" class="input" /></td>
			<td><input type="text" name="expvala_add" id="expvala_add" class="input small" value="" />
				~
				<input type="text" name="expvalb_add" id="expvalb_add" class="input small" value="" /></td>
			<td><input type="text" name="stars_add" id="stars_add" class="input small" /></td>
			<td><input type="text" name="color_add" id="color_add" class="input" /></td>
			<td>&nbsp;</td>
	</tr>
  </table>
  </form>
</div>
<!--/列表-->

<!--内容底部-->
<div class="line20"></div>
<div class="pagelist right">
   <a href="#" onclick="form.submit();" class="btn" >提交保存<a/>
</div>
<!--/内容底部-->
</form>
</body>
</html>
